<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl() ;?>/css/bgconten.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl() ;?>/css/style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="<?php echo $this->baseUrl() ;?>/css/caidat.css" media="screen" />
<script src="<?php echo $this->baseUrl() ;?>/scripts/tab/tab.js" type="text/javascript"></script>
<script src="<?php echo $this->baseUrl() ;?>/scripts/caidat.js" type="text/javascript"></script>
<script src="<?php echo $this->baseUrl() ;?>/scripts/validate/jquery.validate.js"></script>
<script src="<?php echo $this->baseUrl() ;?>/scripts/tiny_mce/tiny_mce.js" type="text/javascript"></script>
<script src="<?php echo $this->baseUrl() ;?>/scripts/tiny_mce/jquery.tinymce.js" type="text/javascript"></script>
<script type="text/javascript">
calltinymce();
</script>

<div class ="conten" >

    <table cellpadding="0"  cellspacing="0" class="tableconten" border="0">
        <tr>
            <td class="left_conten" >
            <!-- left  -->
               <div class="module-left">
                      <div class="t_m">
            			<div class="t_r">
            				<h3> 
                                Tạo mới 
            					<a class="toggleicon" href='#'><div onclick="slidetoggle('99')" class='shboxs99 show'><img src="<?php echo $this->baseUrl() ;?>/images/box/down1.png" /></div><div onclick="hslidetoggle('99')" class='hshboxs99 hidden'><img src="<?php echo $this->baseUrl() ;?>/images/box/down2.png" /></div></a>
            				</h3>
            				
            			</div>
            		  </div>
            		  <div id="box99" class="module-content">
            			<ul>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-new_01.png" /><a href="<?php echo $this->baseUrl()?>/thumau/themthumau"   >Thêm thư mẫu  </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-new_01.png" /><a href="<?php echo $this->baseUrl()?>/lienhe/">Thêm liên hệ</a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-new_01.png" /><a href=""> Gửi thư </a></li>
            				
            			</ul>
            		  </div>
            		  <div class="module-bottom">
            			<div class="md-bt-r"><div class="md-bt-l">&nbsp;</div></div>
            		  </div>	                  
               </div>
               
               <!-- thao tac 2 -->
               
               <div class="module-left">
                      <div class="t_m">
            			<div class="t_r">
            				<h3> 
                                Danh Sách
            					<a class="toggleicon" href='#'><div onclick="slidetoggle('98')" class='shboxs98 show'><img src="<?php echo $this->baseUrl() ;?>/images/box/down1.png" /></div><div onclick="hslidetoggle('98')" class='hshboxs98 hidden'><img src="<?php echo $this->baseUrl() ;?>/images/box/down2.png" /></div></a>
            				</h3>
            				
            			</div>
            		  </div>
            		  <div id="box98" class="module-content">
            			<ul>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/guithu/thunhap/"   >Danh sách thư nháp </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/thumau/index/"   >Danh sách thư mẫu </a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="<?php echo $this->baseUrl()?>/lienhe/" >Danh Sách liên hệ</a></li>
            				<li><img class="icons" src="<?php echo $this->baseUrl();?>/images/icon/icon-32-contacts_01.png" /><a href="#" > Danh sách thư đã gửi </a></li>
            				
            			</ul>
            		  </div>
            		  <div class="module-bottom">
            			<div class="md-bt-r"><div class="md-bt-l">&nbsp;</div></div>
            		  </div>	                  
               </div>             
               
            <!--  end left--> 
             </td>
            <td class="right_conten" >
            <div class="bao_benphai">
            <!-- right  -->
                <!-- breadcrumd-->
    			<div class="breadcrum" >
    				<ul>
    					<li class="home"><a href="">Cài đặt hệ thống</a></li>
    					<li class="br_item"><span>Thiết lập gửi thư </span></li>
    				</ul>
    			</div>
		    	<!-- end breadcrumd-->

		    		
		    		<!--  Tab -->
    		<div class="container" style="  min-height: 400px !important;">
				<div class="title_f">
					<h1></h1>
				</div>
			    <ul class="tabs">
			        <li id="li_0" class=""><a href="#tab1">Cấu hình gửi thư</a></li>
			        <li id="li_1" class=""><a href="#tab2">Thông tin cá nhân</a></li>
			        <li id="li_1" class=""><a href="#tab3">Cấu hình chữ ký</a></li>
			    </ul>
			    <div class="tab_container">
			    	<div class="tab_container_r">
			    	<!-- Nội dung tab 1 -->
			       <form name="cauhinhguimail" id='cauhinhguimail' action="<?php echo $this->baseUrl()?>/caidat/updateoneuse" method="POST" >
				   <div class="tab_content" id="tab1" style="display: block;">
		    		<div class="sectionFrm"> Cấu hình gửi thư </div>
		    		<!--  Bên trái -->
		    		<div class="left_conten_form" >
		    			<div class="eleRow">
		    				<div class="eleCaption">Server </div>
		    				<div class="eleBody">
		    					<select id="server" onchange ="chonserver(this.value)">
		    						<option value="" > Chọn </option>
		    						<option value="gmail" > Gmail </option>
		    						<option value="yahoo" > Yahoo </option>
		    					</select>
		    				</div>
		    			</div>			    		
		    			<div class="eleRow">
		    				<div class="eleCaption">SMTP server </div>
		    				<div class="eleBody">
		    					<input type="text" name="sptpserver" id="sptpserver" class="required" value="<?php echo $this->thongtin['SMTP_server']?>"/><span class="redtext">*</span>
		    				</div>
		    			</div>
		    			<div class="eleRow">
		    				<div class="eleCaption">Mã hóa loại</div>
		    				<div class="eleBody">
		    					<select name="loaimahoa" id="loaimahoa" onchange="thongsoketnoi(this.value)">
		    						<option value="ssl"<?php if( $this->thongtin['loai_mahoa'] == 'ssl'){echo "selected='selected'";}?>  > SSL</option>
		    						<option value="tls"<?php if( $this->thongtin['loai_mahoa'] == 'tls'){echo "selected='selected'";}?>  > TLS</option>
		    					</select>
		    					
		    				</div>
		    			</div>
		    			<div class="eleRow">
		    				<div class="eleCaption">SMTP port </div>
		    				<div class="eleBody">
		    					<input type="text" name="sptport" id="sptport" class="required" value="<?php echo $this->thongtin['SMTP_port']?>"/><span class="redtext">*</span>
		    				</div>
		    			</div>		    					    			
		    			
		    		</div>
		    		<!-- ben phải -->
		    		<div class="right_conten_form" >

		    			<div class="eleRow">
		    				<div class="eleCaption">User name</div>
		    				<div class="eleBody">
		    					<input type="text" name="unamesmpt" id="unamesmpt" class="required email" value="<?php echo $this->thongtin['user_name_email']?>"/><span class="redtext">*</span>
		    					
		    				</div>
		    				
		    			</div>
		    			<div class="eleRow">
		    				<div class="eleCaption">Mật khẩu</div>
		    				<div class="eleBody">
		    					<input type="password" id="password" name="passsmpt"  class="required" value="<?php echo $this->matkhau ?>"/><span class="redtext">*</span>
		    					
		    				</div>
		    				
		    			</div>
		    			<div class="eleRow">
		    				<div class="eleCaption"></div>
		    				<div class="eleBody">
		    					<input type="button" onclick="kiemtraketnoi('<?php echo $this->baseUrl()?>');" class="save" value="Kiểm tra kết nối"  />
                                <span id="hinh_load" style="display: none;"> <img src="<?php echo $this->baseUrl() ?>/images/wpspin_light.gif"  /></span><span id="thonbaoketnoi"> </span>
		    					
		    				</div>
		    				
		    			</div>		    			
		    			<div class="eleRow">
		    				<div class="eleCaption">Cập nhật lần cuối</div>
		    				<div class="eleBody">
		    					<input type="text"  disabled="disabled" value="<?php echo $this->thongtin['ngay_sua']?>"/>
		    					
		    				</div>
		    				
		    			</div>	
		    			<div class="eleRow">
		    				<div class="eleCaption">Ngày sửa</div>
		    				<div class="eleBody">
		    					<input type="text"   disabled="disabled" value="<?php echo $this->today; ?>"/>
		    					
		    				</div>
		    				
		    			</div>			    			
			    						    						    		
		    		</div>
		    		<!-- Day form  -->
		    		<div class="day_form">
		    			<input type="hidden" name ="chid" value="<?php echo $this->thongtin['chid']; ?>"/>
                        <input type="hidden" value="<?php  echo $this->iddangnhap; ?>" name ="idnddn"/>
		    			<input type="submit" class="save" value="Lưu lại" style="width:100px;" />
		    			
		    			<input type="button" onclick="javascript:history.go(-1);" class="save" value="Hủy bỏ" style="width:100px;">
		    		</div>
			        </div>
			        </form>
			        <!-- End nội dung tab 1 -->
			        
			        <!-- Start tab 2 -->
			        <form action="<?php echo $this->baseUrl()?>/caidat/updatethongtin" method="post" id="thong_tincanha">
			        <div class="tab_content" id="tab2" style="display: none;">
			           	    		<div class="sectionFrm"> Thông tin cá nhân </div>
		    		<!--  Bên trái -->
		    		<div class="left_conten_form" >
		    			<div class="eleRow">
		    				<div class="eleCaption">Họ và tên </div>
		    				<div class="eleBody">
		    					<input type="text" name="ho_va_ten" class="required" value="<?php echo $this->thongtincanha['name']; ?>"/><span class="redtext">*</span>
		    				</div>
		    			</div>
		    			<div class="eleRow">
		    				<div class="eleCaption">Điện thoại</div>
		    				<div class="eleBody">
								<input type="text" name="dien_thoai" class="required number" value="<?php echo $this->thongtincanha['phone'];?>"/><span class="redtext">*</span>
		    				</div>
		    			</div>
		    			<div class="eleRow">
		    				<div class="eleCaption">Địa chỉ </div>
		    				<div class="eleBody">
		    				<textarea  name="dia_chi"  rows=""   class="required" cols=""><?php echo $this->thongtincanha['address'];?></textarea>
		    				</div>
		    			</div>		    					    			
		    			
		    		</div>
		    		<!-- ben phải -->
		    		<div class="right_conten_form" >

		    			<div class="eleRow">
		    				<div class="eleCaption">Tên Đăng nhập</div>
		    				<div class="eleBody">
		    					<input type="text" name="ten_dang_nhap" class="required"   minlength ="6" value="<?php echo $this->thongtincanha['uname']; ?>"/><span class="redtext">*</span>
		    					
		    				</div>
		    				
		    			</div>
		    			<div class="eleRow">
		    				<div class="eleCaption">Mật khẩu</div>
		    				<div class="eleBody">
		    					<input type="button" onclick="thaydoimatkhau('<?php echo $this->thongtincanha['uid'] ?>');" class="save" name="sptpserver" value="Đổi mật khẩu "/>
		    				</div>
		    				
		    			</div>
		    			<div class="eleRow">
		    				<div class="eleCaption">Email</div>
		    				<div class="eleBody">
		    					<input type="text"  class="required email"  name="email" value="<?php echo $this->thongtincanha['email']; ?>"/><span class="redtext">*</span>
		    					
		    				</div>
		    				
		    			</div>
		    			<div class="eleRow">
		    				<div class="eleCaption">Cập nhật lần cuối</div>
		    				<div class="eleBody">
		    					<input type="text"  name="sptpserver" disabled="disabled" value="<?php echo $this->thongtincanha['ngay_sua']; ?>"/>
		    					
		    				</div>
		    				
		    			</div>	
		    			<div class="eleRow">
		    				<div class="eleCaption">Ngày sửa</div>
		    				<div class="eleBody">
		    					<input type="text"  name="sptpserver" disabled="disabled" value="<?php echo $this->today; ?>"/>
		    					
		    				</div>
		    				
		    			</div>			    				    					    			
			    						    						    		
		    		</div>
		    		<!-- Day form  -->
		    		<div class="day_form">
		    			<input type="hidden" value = "<?php echo $this->thongtincanha['uid']; ?>" name="uid"/>
                        <input type="hidden" value="<?php  echo $this->iddangnhap; ?>" name ="idnddn"/>
		    			<input type="submit" class="save" value="Lưu lại" style="width:100px;" />
		    			
		    			<input type="button" onclick="javascript:history.go(-1);" class="save" value="Hủy bỏ" style="width:100px;">
		    		</div>
			        </div>
			        <!-- end tab 2 -->
			        </form>
			        <!--  Start tab 3 -->
			        <form action="<?php echo $this->baseUrl()?>/caidat/updatachuky" method="post" id="thong_tincanha" onsubmit="return luuchuky();" >
			            <div class="tab_content" id="tab3" style="display: none;">
			            		<div class="sectionFrm"> Thông tin chữ ký </div>
								<!-- Start left -->
								<div class="left_conten_form" >
									<div class="eleRow">
					    				<div class="eleCaption">Sử dụng chữ ký </div>
					    				<div class="eleBody">
					    					<input type="checkbox" name="sudungchuky"  id="sudungchuky" <?php if($this->thongtin['su_dung_chu_ky'] == 1){ echo "checked='checked'"; } ?>  />
					    				</div>
					    			</div>
								</div>
								<!-- end left conten  -->
								<div class="right_conten_form" >
					    			<div class="eleRow">
					    				<div class="eleCaption">Cập nhật lần cuối</div>
					    				<div class="eleBody">
					    					<input type="text"  name="sptpserver" disabled="disabled" value="<?php echo $this->thongtin['ngay_sua']; ?>"/>
					    					
					    				</div>
					    				
					    			</div>	
					    			<div class="eleRow">
					    				<div class="eleCaption">Ngày sửa</div>
					    				<div class="eleBody">
					    					<input type="text"  name="sptpserver" disabled="disabled" value="<?php echo $this->today; ?>"/>
					    					
					    				</div>
					    				
					    			</div>									
								</div>
								<!--  End right  -->
								<!--  Nội dung chữ ký -->
					    			<div class="eleRow">
					    				<div class="eleCaption" style="width: 15% !important;">Chữ Ký</div>
					    				<div class="eleBody">
					    					<textarea id='chukyid' name="chuky"> <?php echo $this->thongtin['chu_ky']; ?> </textarea>
					    					
					    				</div>
					    				
					    			</div>
                                 		    		<!-- Day form  -->
                		    		<div class="day_form">
				 		    			<input type="hidden" value = "<?php echo $this->thongtincanha['uid']; ?>" name="uid"/>
						    			<input type="hidden" value="<?php  echo $this->iddangnhap; ?>" name ="idnddn"/>               		    			
                                        <input type="submit"   class="save" value="Lưu lại" style="width:100px;" />
                		    			<input type="button" onclick="javascript:history.go(-1);" class="save" value="Hủy bỏ" style="width:100px;">
                		    		</div>   	
								
								<!-- End moi dung chu ky -->			            
			            
			            
			            
			            </div>
			        <!--  End  tab 3 -->			        
		    </div>
		    </div>
		</div>
				
		    	<!--  End Tab -->
		    	
		    </div>	
            <!-- right -->
            </td>
            
        </tr>
    
    </table>
</div>


<!-- Phầm popup thay doi pass wook  -->
<div id="doimatkhau"  style="display:none;" title="Thay đổi mật khẩu đăng nhập hệ thống" >
          <form id="doi_pass_form" >
            <div class="row_1"> 
                <div class="ten_chu"><label for="name">Nhập mật khẩu mới </label></div>
                <div class="input_popup" ><input type="password"" name="mat_khau_moi_1" id="mat_khau_moi_1" class="required text ui-widget-content ui-corner-all input" /></div>
            </div>
            <div class="row_1"> 
                <div class="ten_chu"><label for="name">Nhập lại mật khẩu mới </label></div>
                <div class="input_popup" ><input type="password" name="mat_khau_moi_2" id="mat_khau_moi_2" class="required text ui-widget-content ui-corner-all input" /></div>
            </div> 
           <div align="center" style="margin-top: 15px;">
           <input type="hidden" value="<?php echo $this->baseUrl()?>/caidat/updatepass" id="url">
            <input type="button"  onclick="doipass('<?php echo $this->thongtincanha['uid'] ?>');" class="save" value="Lưu lại" style="width:100px;" />
            </div>   
         </form>            

</div> 

